From 32779f7c87bfae82e8bdaf24ca93548bda5b96da Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Glondu?= Date: Sun, 1 Mar 2026 21:32:57 +0100 Subject: [PATCH] Stabilize compiler-libs ABI by not including config.cmx --- ...le-utils-config.-cmi-cmx-with-opaque.patch | 26 +++++++++++++++++++ debian/patches/series | 1 + debian/rules | 2 ++ 3 files changed, 29 insertions(+) create mode 100644 debian/patches/Compile-utils-config.-cmi-cmx-with-opaque.patch diff --git a/debian/patches/Compile-utils-config.-cmi-cmx-with-opaque.patch b/debian/patches/Compile-utils-config.-cmi-cmx-with-opaque.patch new file mode 100644 index 00000000..21758cb3 --- /dev/null +++ b/debian/patches/Compile-utils-config.-cmi-cmx-with-opaque.patch @@ -0,0 +1,26 @@ +From: =?utf-8?q?St=C3=A9phane_Glondu?= +Date: Sun, 1 Mar 2026 21:32:31 +0100 +Subject: Compile utils/config.{cmi,cmx} with -opaque + +The goal is to stabilize compiler-libs ABI. +--- + Makefile | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/Makefile b/Makefile +index 4ce5da6..c9d4300 100644 +--- a/Makefile ++++ b/Makefile +@@ -2546,6 +2546,12 @@ endif + %.cmx: %.ml + $(V_OCAMLOPT)$(COMPILE_NATIVE_MODULE) -c $< + ++utils/config.cmi: utils/config.mli ++ $(V_OCAMLC)$(CAMLC) $(OC_COMMON_COMPFLAGS) -I $(@D) $(INCLUDES) -opaque -c $< ++ ++utils/config.cmx: utils/config.ml ++ $(V_OCAMLOPT)$(COMPILE_NATIVE_MODULE) -opaque -c $< ++ + partialclean:: + for d in utils parsing typing bytecomp asmcomp middle_end file_formats \ + lambda middle_end/closure middle_end/flambda \ diff --git a/debian/patches/series b/debian/patches/series index 6da62215..f7cc4551 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -4,3 +4,4 @@ Do-not-error-on-warnings-in-autoconf.patch Use-CCLINKFLAGS-for-linking-all-executables-and-shar.patch Mark-test_compact_manydomains-as-multicore.patch Increase-the-amount-of-data-written-to-a-pipe-in-a-test.patch +Compile-utils-config.-cmi-cmx-with-opaque.patch diff --git a/debian/rules b/debian/rules index 1aadd633..dee2d094 100755 --- a/debian/rules +++ b/debian/rules @@ -222,6 +222,8 @@ install-stamp-arch: install-stamp install-stamp: # Install OCaml $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp +# Remove config.cmx so that it is not part of compiler-libs ABI + rm -f debian/tmp$(OCAML_STDLIB_DIR)/compiler-libs/config.cmx ifeq (,$(DEB_TEST_BUILD_PREFIX)) # Remove Debian-specific file rm -f debian/tmp$(OCAML_STDLIB_DIR)/ld.conf -- 2.30.2